Skip to content

fix(NcInputField): use overflow-wrap: anywhere instead of word-break: break-all for the helper text#8225

Merged
susnux merged 1 commit intonextcloud-libraries:mainfrom
Sector6759:input-field-helper-text-wrapping
Feb 27, 2026
Merged

fix(NcInputField): use overflow-wrap: anywhere instead of word-break: break-all for the helper text#8225
susnux merged 1 commit intonextcloud-libraries:mainfrom
Sector6759:input-field-helper-text-wrapping

Conversation

@Sector6759
Copy link
Contributor

@Sector6759 Sector6759 commented Feb 18, 2026

PR #8128 introduced a new bug when it tried to fix another one. The PR added word-break: break-all; to the helper text, preventing long unbreakable URLs from overflowing the container, but this now leads to any word being broken into multiple lines, even if the word where the line break occurs would itself fit into the container. This new PR instead uses overflow-wrap: anywhere; which appears to be fine for any text. The only "downside", if you'd want to call it that, is that Firefox and Chrome insert the line break at different positions when encountering a long URL, as you can see in the second set of screenshots.

🖼️ Screenshots

"Normal" text

Browser Before After
Firefox firefox_before_1 firefox_after_1
Chrome chrome_before_1 chrome_after_1

Long unbreakable URL

Browser Before After
Firefox firefox_before_2 firefox_after_2
Chrome chrome_before_2 chrome_after_2

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

…ak: break-all` for the helper text

Signed-off-by: Sector6759 <149817326+Sector6759@users.noreply.github.com>
@Sector6759 Sector6759 force-pushed the input-field-helper-text-wrapping branch from 4b357a2 to ed7c046 Compare February 18, 2026 13:56
@susnux susnux requested a review from artonge February 26, 2026 08:59
@susnux susnux added bug Something isn't working 3. to review Waiting for reviews design Design, UX, interface and interaction design labels Feb 26, 2026
@susnux susnux added this to the 9.6.0 milestone Feb 26, 2026
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thanks for looking into it :)

@artonge
Copy link
Contributor

artonge commented Feb 26, 2026

/backport to stable8

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.84%. Comparing base (985023c) to head (ed7c046).
⚠️ Report is 61 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8225      +/-   ##
==========================================
+ Coverage   52.82%   52.84%   +0.02%     
==========================================
  Files         103      103              
  Lines        3351     3351              
  Branches      976      976              
==========================================
+ Hits         1770     1771       +1     
+ Misses       1333     1332       -1     
  Partials      248      248              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@artonge artonge requested a review from susnux February 26, 2026 17:22
@susnux susnux merged commit 95c37c8 into nextcloud-libraries:main Feb 27, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working design Design, UX, interface and interaction design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants